solves problems involving combinations